package org.cuit.seon.explore.handle;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author wuwen
 */
@RestControllerAdvice(annotations = RestController.class)
@Slf4j
public class ExceptionHandle {

    @ExceptionHandler(value = Exception.class)
    public String handlerException(Exception e){
        log.error("我是RestControllerAdvice, 我出错了捏" + e);
        return "我出错了捏" + e;
    }

}